<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.andrew.entity.Customer" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>Qweas Bookstore - Front Page</title>

    <link href="css/ui.css" rel="stylesheet"/>
    <link href="css/framework.css" rel="stylesheet"/>
    <link href="css/customer.css" rel="stylesheet"/>
    <link type="text/css" rel="stylesheet" media="screen and (min-width:861px) and (max-width:960px)"
          href="css/customer/landscape.css" />
    <link type="text/css" rel="stylesheet" media="screen and (min-width:601px) and (max-width:860px)"
          href="css/customer/pad-portrait.css" />
    <link type="text/css" rel="stylesheet" media="screen and (min-width:481px) and (max-width:600px)"
          href="css/customer/mobile-landscape.css" />
    <link type="text/css" rel="stylesheet" media="screen and (max-width:480px)"
          href="css/customer/mobile-portrait.css" />

    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="js/customer.js"></script>
</head>

<body>
    <div id="header">
        <img id="imgLogo" style="margin-left: 10px;margin-top:10px;" src="images/bookstore_logo.png"/>
        <div id="navbar" align="right">
        	<div style="margin-top: 5px;" class="welcomeWords">
        		<c:if test="${customer.userName!=null}">
    				<div id="cusrname">Welcome ${customer.userName}</div>
    			</c:if>
        		<c:if test="${customer.userName==null}">
    				<a id="cusrname" href="login.jsp" style="color:white;">请登录</a>
    			</c:if>
        	</div>
        	    <c:if test="${customer.userName!=null}">
        	    <div id="btnShoppingCart" class="navbar_item div-button font-navbar">
                <i class="fa fa-shopping-cart font-navbar"></i>&nbsp;CART
                <span id="itemCount" class="circle-badge">0</span>
            </div>
            <div id="btnMyOrder" class="navbar_item div-button font-navbar">
                <i class="fa fa-user font-navbar"></i>&nbsp;MY ORDER
            </div>
            <div id="btnSignout" class="navbar_item div-button font-navbar">
                <i class="fa fa-sign-out font-navbar"></i>&nbsp;LOG OUT
            </div>
    			</c:if>
    	    <c:if test="${customer.userName==null}">
    				<div  class="navbar_item div-button font-navbar">
                <i class="fa fa-shopping-cart font-navbar"></i>&nbsp;CART
                <span id="itemCount" class="circle-badge">0</span>
            </div>
            <div  class="navbar_item div-button font-navbar">
                <i class="fa fa-user font-navbar"></i>&nbsp;MY ORDER
            </div>
            <div  class="navbar_item div-button font-navbar">
                <i class="fa fa-sign-out font-navbar"></i>&nbsp;LOG OUT
            </div>
    			</c:if>
        </div>
    </div>
    <div class="top">
        <div class="main">
            <!-- Big banner goes here -->
            <span class="index_img">
                <img src="images/banner_img.png" alt="" border="0" usemap="#Map"/>
                <map name="Map" id="Map">
                    <area shape="rect" coords="790,230,905,275" href="about.jsp" alt="about us" />
                </map>
            </span>
            <p class="index_hr"></p>
            <div class="content">
                <h1 class="h1_book_title">Wishing you have a happy shopping!</h1>
                <!-- Book list goes here -->
                <ul id="Books"></ul>
                <!-- Page indicator -->
                <div id="bookPage"></div>
            </div>
        </div>
        </div>
        <div id="footer" align="center">
             <div id="copyRight" style="font-size: 13px; color: lightgray;">
                 © 2018 Qweas Bookstore, Zhang Wenqiang, Wu Jiatian, Ethan Phung, Andrew Lu and Eric Shuai. All rights reserved.</p>
        </div>
        </div>
</body>
</html>